package com.zzedu.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.zzedu.common.annotation.Excel;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 通知消息对象 zz_message
 * 
 * @author Mr.Wang
 * @date 2025-03-15
 */
@TableName("zz_message")
public class ZzMessage implements Serializable
{
    private static final long serialVersionUID = 1L;

    /** id */
    @TableId(type = IdType.AUTO)
    private Long id;

    /** 消息类型 0-系统消息,1-课程到期通知 2-作业批改通知 */
    @Excel(name = "消息类型 0-系统消息,1-课程到期通知 2-作业批改通知")
    private Integer noticeType;

    /** 消息标题 */
    @Excel(name = "消息标题")
    private String title;

    /** 消息内容 */
    @Excel(name = "消息内容")
    private String content;

    /** 消息发送人 */
    @Excel(name = "消息发送人")
    private Long sendUserId;

    /** 消息发送人类型 */
    @Excel(name = "消息发送人类型")
    private Integer sendUserType;

    /** 消息接收人 */
    @Excel(name = "消息接收人")
    private Long acceptUserId;

    /** 消息接收人类型 */
    @Excel(name = "消息接收人类型")
    private Integer acceptUserType;

    /** 消息发送时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "消息发送时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime sendTime;

    /** 是否阅读 */
    @Excel(name = "是否阅读")
    private Integer readFlag;

    /** 消息阅读时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "消息阅读时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime readTime;

    /** 逻辑删除(0：未删除 1：id) */
    @TableLogic(delval = "id")
    @TableField(fill = FieldFill.INSERT)
    private Integer deleted;

    /** 创建人 */
    @TableField(fill = FieldFill.INSERT)
    private Long createBy;

    /** 修改人 */
    @TableField(fill = FieldFill.UPDATE)
    private Long updateBy;

    /**
     * 扩展信息
     */
    private String extendInfo;
    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setNoticeType(Integer noticeType) 
    {
        this.noticeType = noticeType;
    }

    public Integer getNoticeType() 
    {
        return noticeType;
    }
    public void setTitle(String title) 
    {
        this.title = title;
    }

    public String getTitle() 
    {
        return title;
    }
    public void setContent(String content) 
    {
        this.content = content;
    }

    public String getContent() 
    {
        return content;
    }
    public void setSendUserId(Long sendUserId) 
    {
        this.sendUserId = sendUserId;
    }

    public Long getSendUserId() 
    {
        return sendUserId;
    }
    public void setSendUserType(Integer sendUserType) 
    {
        this.sendUserType = sendUserType;
    }

    public Integer getSendUserType() 
    {
        return sendUserType;
    }
    public void setAcceptUserId(Long acceptUserId) 
    {
        this.acceptUserId = acceptUserId;
    }

    public Long getAcceptUserId() 
    {
        return acceptUserId;
    }
    public void setAcceptUserType(Integer acceptUserType) 
    {
        this.acceptUserType = acceptUserType;
    }

    public Integer getAcceptUserType() 
    {
        return acceptUserType;
    }
    public void setSendTime(LocalDateTime sendTime) 
    {
        this.sendTime = sendTime;
    }

    public LocalDateTime getSendTime() 
    {
        return sendTime;
    }
    public void setReadFlag(Integer readFlag) 
    {
        this.readFlag = readFlag;
    }

    public Integer getReadFlag() 
    {
        return readFlag;
    }
    public void setReadTime(LocalDateTime readTime) 
    {
        this.readTime = readTime;
    }

    public LocalDateTime getReadTime() 
    {
        return readTime;
    }
    public void setDeleted(Integer deleted) 
    {
        this.deleted = deleted;
    }

    public Integer getDeleted() 
    {
        return deleted;
    }
    public void setCreateBy(Long createBy) 
    {
        this.createBy = createBy;
    }

    public Long getCreateBy() 
    {
        return createBy;
    }
    public void setUpdateBy(Long updateBy) 
    {
        this.updateBy = updateBy;
    }

    public Long getUpdateBy() 
    {
        return updateBy;
    }

    public String getExtendInfo() {
        return extendInfo;
    }

    public void setExtendInfo(String extendInfo) {
        this.extendInfo = extendInfo;
    }

    @Override
    public String toString() {
        return  ToStringBuilder.reflectionToString(this,ToStringStyle.JSON_STYLE);
    }
}
